package com.ys.erp.entity.data.bean;

import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author lwj
 * @date 2025/7/24
 */
    
/**
 * 用户强烈投诉日志表
 */
@Data
@TableName(value = "t_strong_complaint_record")
public class StrongComplaintRecord {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 投诉单号
     */
    @TableField(value = "complaint_no")
    private String complaintNo;

    /**
     * 类型，UN_DIS:待处理，DIS_START:开始处理，DIS_OK:已完成处理，DIS_SOLVE:已解决，DIS_UN_SOLVE:未解决
     */
    @TableField(value = "record_type")
    private String recordType;

    /**
     * 日志时间
     */
    @TableField(value = "record_time")
    private LocalDateTime recordTime;

    /**
     * 处理描述
     */
    @TableField(value = "dis_describe")
    private String disDescribe;

    /**
     * 处理图片
     */
    @TableField(value = "dis_image")
    private String disImage = "[]";

    @TableField(value = "version")
    @Version
    private Integer version;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;

    public List<String> getComplaintImageList() {
        return JSONArray.parseArray(this.disImage, String.class);
    }
}